//
//  MyInputView.m
//  HandheldHospital
//
//  Created by zhangchao on 16/3/3.
//  Copyright © 2016年 zhangchao. All rights reserved.
//

#import "MyInputView.h"
#import <Masonry.h>

@implementation MyInputView
- (instancetype)initWithFrame:(CGRect)frame
{
    if(self = [super initWithFrame:frame])
    {
        [self addViews];
    }
    return self;
}



//添加两个Button
- (void)addViews
{
    self.backgroundColor = [UIColor whiteColor];
    self.cancelBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.cancelBtn setTitle:@"取消" forState:UIControlStateNormal];
    [self.cancelBtn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    self.cancelBtn.titleLabel.font = [UIFont systemFontOfSize:13];
    
    
    [self addSubview:self.cancelBtn];
    [self.cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(5);
        make.left.equalTo(self).offset(5);
        make.size.mas_equalTo(CGSizeMake(50, 30));
    }];
    
    self.saveBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.saveBtn setTitle:@"确定" forState:UIControlStateNormal];
    [self.saveBtn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    
    self.saveBtn.titleLabel.font = [UIFont systemFontOfSize:13];
    [self addSubview:self.saveBtn];
    [self.saveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(5);
        make.right.equalTo(self).offset(-5);
        make.size.mas_equalTo(CGSizeMake(50, 30));
    }];

}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
